<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 2
        // function fun(arr){
        //     return arr.map(item=>item+10)
        // }
        // console.log(fun([1,2,3,4]))


        // 1
        function fun(arr){
            var res=0
            for(i=0;i<arr.length;i++){
                for(n=0;n<arr[i].length;n++){
                    res+=arr[i][n]
                    console.log(arr[0][1])
                }
            }
            return res
        }
        console.log([[1,2,3],[4,5],[6,7,8]])



    </script>
</body>
</html>